﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="Cart1.aspx.cs" Inherits="MyWeb.Cart1" %>



<asp:Content ID="Content1" ContentPlaceHolderID="Contents" Runat="Server">
    <h4>User-->Cart</h4>
    <div class="art-content-layout-wrapper layout-item-0">
        <div class="art-content-layout layout-item-1" style="text-align:center;" id="cartStep1" runat="server">
            <h3>Order</h3>
            <br />
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" 
                AllowPaging="True" PageSize="2" AllowSorting="True"
                DataKeyNames="ImageID,ImgSize,ImgQuantity" 
                OnPageIndexChanging="GridView1_PageIndexChanging" OnRowCommand="GridView1_RowCommand"
                OnRowUpdating="btnupdate_Click" 
                >
                <Columns>
                    <asp:TemplateField HeaderText="Album">
                        <ItemTemplate>
                            <asp:Label ID="lblAlbumName" runat="server" Text='<%# Eval("AlbumName") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Picture">
                        <ItemTemplate>
                            <asp:Label ID="lblImgName" runat="server" Text='<%# Eval("ImgName") %>'></asp:Label>
                            <br />
                            <img src="<%#Eval("ImgPath") %>" style="width:400px;"/>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Img-Size">
                        <ItemTemplate>
                            <asp:Label ID="lblImgSize" runat="server" Text='<%# Eval("ImgSize")+ "inch" %>'></asp:Label>
                        </ItemTemplate>                        
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Unit-Price">
                        <ItemTemplate>
                            <asp:Label ID="lblUnitPrice" runat="server" Text='<%# Eval("UnitPrice")+"$" %>'></asp:Label>
                        </ItemTemplate>                        
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Quantity">
                        <ItemTemplate>
                            <asp:TextBox ID="txtQuantity" runat="server" Text='<%# Eval("ImgQuantity") %>'></asp:TextBox>
                        </ItemTemplate>                        
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Total-Price">
                        <ItemTemplate>
                            <asp:Label ID="lblTotalPrice" runat="server" Text='<%#getTotalPriceByID(Eval("ImageID").ToString()) +"$"%>'></asp:Label>
                        </ItemTemplate>                        
                    </asp:TemplateField>                  
                    <asp:TemplateField HeaderText="Command">
                        <ItemTemplate>
                            <asp:LinkButton ID="btnupdate" runat="server" ForeColor="White" OnClick="btnupdate_Click" CommandName="update">update</asp:LinkButton>&nbsp;|&nbsp;<asp:LinkButton ID="btnremove" runat="server" ForeColor="White" OnClick="btnremove_Click" CommandName="remove">remove</asp:LinkButton>                                                        
                        </ItemTemplate>                        
                    </asp:TemplateField>
                    
                </Columns>
                <EmptyDataTemplate>
                    There is'nt any item in cart please add more...
                </EmptyDataTemplate>
            </asp:GridView>
            <br />

           
        </div>
        
       
       <div class="art-content-layout layout-item-1" style="text-align:center;"  runat="server" id="makeOD">
         
           <asp:Button ID="btnMakeOrder" runat="server" Text="Make Order" 
               onclick="btnMakeOrder_Click" />

       </div>
    </div>
</asp:Content>


